export default [
    {
        path: '/index',
        name: 'index',
        meta: { title: '主页', permission_no: 1 },
        component: () => import('../views/Index.vue'),
        children: [
            {
                path: '/index/business',
                name: 'business',
                meta: { title: '出差申请', permission_no: 11 },
                component: () => import('../views/Index/Business.vue'),
            },
            {
                path: '/index/outside',
                name: 'outside',
                meta: { title: '外勤打卡', permission_no: 12 },
                component: () => import('../views/Index/Outside.vue'),
            },
            {
                path: '/index/leave',
                name: 'leave',
                meta: { title: '请假申请', permission_no: 13 },
                component: () => import('../views/Index/Leave.vue'),
            },
            {
                path: '/index/work',
                name: 'work',
                meta: { title: '加班申请', permission_no: 14 },
                component: () => import('../views/Index/Work.vue'),
            },
            { //重定向路由,
                path: '/index',
                redirect: '/index/business' //路由重定向,即打开页面时直接显示的那个页面，每一级路由都可以加，要加在最后
            },
            { //404 路由
                path: '*', // * 表示 匹配所有路由地址，善后处理所有路由匹配不到，就跳这个
                name: 'NotFound',
                meta: { title: 'NotFound' },
                component: () => import('../views/NotFound.vue')
            }
        ]
    },
    {
        path: '/login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import('../views/Login.vue')
    },
    {
        path: '/register',
        name: 'register',
        meta: { title: '注册', permission_no: 2 },
        component: () => import('../views/Register.vue')
    },
    { //重定向路由,
        path: '/',
        redirect: '/index' //路由重定向,即打开页面时直接显示的那个页面，每一级路由都可以加，要加在最后
    },
    { //404 路由
        path: '*', // * 表示 匹配所有路由地址，善后处理所有路由匹配不到，就跳这个
        name: 'NotFound',
        meta: { title: 'NotFound' },
        component: () => import('../views/NotFound.vue')
    }
]